//
//  NoDataTipView.m
//  PoliceJL
//
//  Created by macbook on 16/3/10.
//  Copyright © 2016年 Yy. All rights reserved.
//

#import "NoDataTipView.h"

@implementation NoDataTipView

-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.backgroundColor = [UIColor whiteColor];
        
        [self addImageView:frame];
    }
    
    return self;
}

-(void)addImageView:(CGRect)rect
{
   UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake((rect.size.width-100)/2, 100, 100, 100)];
    
   [imageView setImage:[UIImage imageNamed:@"all_prompt_images_no_info"]];
    
   [self addSubview:imageView];
    
   UILabel *tipLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(imageView.frame), rect.size.width, 30)];
    
   tipLabel.text = @"暂无数据";

   tipLabel.textColor = [UIColor lightGrayColor];

   tipLabel.textAlignment= NSTextAlignmentCenter;
    
   [self addSubview:tipLabel];
}

@end
